/**
 * Alipay.com Inc.
 * Copyright (c) 2004-2014 All Rights Reserved.
 */
package com.lshtv.service;

import org.springframework.beans.factory.annotation.Autowired;

import com.lshtv.dao.WorkDAO;
import com.lshtv.model.Work;

/**
 * 
 * @author danjingyu
 * @version $Id: ArticleServiceFacadeImpl.java, v 0.1 2014-3-11 下午11:22:10 danjingyu Exp $
 */
public class WorkServiceFacadeImpl implements WorkServiceFacade {
    @Autowired
    private WorkDAO workDAO;

    /** 
     * @see com.lshtv.service.ArticleServiceFacade#insertArticle(com.lshtv.model.Article)
     */
    public int addWork(Work work) {
        workDAO.save(work);
        return work.getId();
    }

    /** 
     * @see com.lshtv.service.ArticleServiceFacade#updateArticle(com.lshtv.model.Article)
     */
    public int updateWork(Work work) {
        workDAO.attachDirty(work);
        return work.getId();
    }
}
